package com.codeduck.bean;

import com.codeduck.bean.entity.BeanFullLifeCycle;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author: <a href="mailto:codeduck@163.com">Codeduck</a>
 * @since: 2021-12-23
 */
@SpringBootApplication
public class BeanApplication {
    public static void main(String[] args) {
        SpringApplication.run(BeanApplication.class, args);
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(BeanFullLifeCycle.class);
        BeanFullLifeCycle beanFullLifeCycle = context.getBean(BeanFullLifeCycle.class);
        beanFullLifeCycle.setSex("M");
        context.close();
    }
}
